Part Number Hot Search : 
MV313TGN 30C01SS SC165E 065ET0 3266P253 HYMP512 JE350 N5266
Product Description
Full Text Search
 

To Download DS1341U Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 19-4998; Rev 0; 10/09
Low-Current I2C RTCs for High-ESR Crystals
General Description
The DS1341/DS1342 low-current real-time clocks (RTCs) are timekeeping devices that provide an extremely low standby current, which permits longer life from a power supply. The DS1341/DS1342 support high-ESR crystals, which broaden the pool of usable crystals for the devices. The DS1341 uses a 6pF crystal, while the DS1342 uses a 12.5pF crystal. These devices are accessed through an I2C serial interface. Other features include two time-of-day alarms, two interrupt outputs, a programmable squarewave output, and a serial bus timeout mechanism. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either 24hr or 12hr format with an AM/PM indicator. The DS1341/DS1342 also include an input for synchronization. When a reference clock (e.g., 60Hz power line or GPS 1PPS) is present at the CLKIN pin and the enable external clock input bit (ECLK) is set to 1, the DS1341/ DS1342 RTCs are frequency-locked to the external clock and the clock accuracy is determined by the external source. In case of external clock failure, the clock is switched to the crystal oscillator. The devices are available in a lead(Pb)-free/RoHScompliant, 8-pin FSOP package. The devices support a -40NC to +85NC extended temperature range.
Features
S Low Timekeeping Current of 250nA (typ) S Compatible with Crystal ESR Up to 80kI S Use Crystals with CL = 6pF (DS1341) or
DS1341/DS1342
CL = 12.5pF (DS1342)
S +1.8V to +5.5V Operating Voltage Range S Maintain Time Down to +1.15V (typ) S Fast (400kHz) I2C Interface S Bus Timeout for Lockup-Free Operation S RTC Counts Seconds, Minutes, Hours, Day, Date,
Month, and Year with Leap Year Compensation Valid Through 2099
S External Clock Source for Synchronization Clock
Reference (e.g., 32kHz, 50Hz/60Hz Power Line, GPS 1PPS)
S Two Time-of-Day Alarms with Two Interrupt
Outputs
S Programmable Square-Wave Output S Industrial Temperature Range S Small, 8-Pin SOP Package
Ordering Information
PART DS1341U+ DS1341U+T&R DS1342U+* DS1342U+T&R* TEMP RANGE -40NC to +85NC -40NC to +85NC -40NC to +85NC -40NC to +85NC PINPACKAGE 8 FSOP 8 FSOP 8 FSOP 8 FSOP OSC CL (pF) 6 6 12.5 12.5
Applications
Medical Point of Sale (POS) Telematics Portable Instruments Portable Audio Automotive
+Denotes a lead(Pb)-free/RoHS-compliant package. T&R = Tape and reel. *Future product--contact factory for availability.
Typical Operating Circuit
VCC VCC
Pin Configuration
TOP VIEW
RPU
RPU
RPU SCL SDA CLKIN/INTA VCC X1
X1 X2
1 2 3 4
+
DS1341 DS1342
8 7 6 5
VCC SQW/INTB SCL SDA
CPU
SQW/INTB
X2
CLKIN/INTA GND
DS1341/DS1342 GND
SOP
_______________________________________________________________ Maxim Integrated Products 1
For pricing, delivery, and ordering information, please contact Maxim Direct at 1-888-629-4642, or visit Maxim's website at www.maxim-ic.com.
Low-Current I2C RTCs for High-ESR Crystals DS1341/DS1342
ABSOLUTE MAXIMUM RATINGS
Voltage Range on Any Pin Relative to Ground ....-0.3V to +6.0V Operating Temperature Range .......................... -40NC to +85NC Junction-to-Ambient Thermal Resistance (BJA) (Note 1) ........................................ +221NC/W Junction-to-Case Thermal Resistance (BJC) (Note 1) ......................................... +39NC/W Junction Temperature Maximum.....................................+150NC Storage Temperature Range............................ -55NC to +125NC Soldering Temperature ......................... Refer to the IPC/JEDEC J-STD-020 Specification.
Note 1: Package thermal resistances were obtained using the method described in JEDEC specification JESD51-7, using a fourlayer board. For detailed information on package thermal considerations, refer to www.maxim-ic.com/thermal-tutorial.
Stresses beyond those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. These are stress ratings only, and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of the specifications is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.
DC ELECTRICAL CHARACTERISTICS
(VCC = +1.8V to +5.5V, TA = -40NC to +85NC, unless otherwise noted.) (Note 2) PARAMETER Operating Voltage Range Minimum Timekeeping Voltage Timekeeping Current: DS1341 CLKIN = GND or CLKIN = VCC (Note 4) Logic 1 Input Logic 0 Input Input Leakage (SCL, CLKIN/INTA) Output Leakage (CLKIN/INTA, SQW/INTB) Output Logic 1 VOH = +1.0V (SQW /INTB) Output Logic 0 VOL = +0.4V (SDA, CLKIN/INTA, SQW/INTB) SYMBOL VCC VCCT VCCTMIN CONDITIONS Full operation (Note 3) Timekeeping (Notes 3, 4) TA = +25NC (Notes 3, 4) VCC = +3.0V, EGFIL = 0, DOSF = 1 ICCT VCC = +5.5V VCC = +3.0V, EGFIL = 1, DOSF = 0 VCC = +5.5V VIH VIL ILI IO IOH IOL (Note 2) (Note 2) ECLK = 1, VIN = 0V to VCC ECLK = A1IE = A2IE = 0 VCC R 1.8V, INTCN = 0 VCC R 1.3V, INTCN = 0 VCC R 1.8V VCC R 1.3V (Note 5) 0.7 x VCC -0.3 -0.1 -1.0 -3.0 -250 3.0 250 MIN 1.8 1.3 1.15 220 250 280 320 TYP MAX 5.5 5.5 1.3 500 600 560 700 VCC + 0.3 0.3 x VCC +0.1 +1.0 V V FA FA mA FA mA FA nA UNITS V V
2
Low-Current I2C RTCs for High-ESR Crystals
AC ELECTRICAL CHARACTERISTICS
(VCC = +1.8V to +5.5V, TA = -40NC to +85NC, unless otherwise noted.) (Note 2, Figure 1) PARAMETER SCL Clock Frequency Bus Free Time Between a STOP and START Condition Hold Time (Repeated) START Condition Low Period of SCL Clock High Period of SCL Clock Data Hold Time Data Setup Time Setup Time for a Repeated START Condition Rise Time of Both SDA and SCL Signals Fall Time for Both SDA and SCL Signals Setup Time for STOP Condition Capacitive Load for Each Bus Line I/O Capacitance SCL Spike Suppression Oscillator Stop Flag (OSF) Delay Timeout Interval SYMBOL fSCL tBUF tHD:STA tLOW tHIGH tHD:DAT tSU:DAT tSU:STA tR tF tSU:STO CB CI/O tSP tOSF tTIMEOUT (Note 12) (Note 13) 25 (Note 11) 10 30 25 100 35 (Note 11) (Note 11) (Notes 8, 9) (Note 10) (Note 7) (Note 6) 1.3 0.6 1.3 0.6 0 100 0.6 20 + 0.1CB 20 + 0.1CB 0.6 400 300 300 0.9 CONDITIONS MIN TYP MAX 400 UNITS kHz Fs Fs Fs Fs Fs ns Fs ns ns Fs pF pF ns ms ms
DS1341/DS1342
CRYSTAL PARAMETERS
PARAMETER Nominal Frequency Series Resistance Load Capacitance Note Note Note Note Note Note Note Note Note 2: 3: 4: 5: 6: SYMBOL fO ESR CL DS1341 DS1342 CONDITIONS MIN TYP 32.768 35 6 12.5 80 MAX UNITS kHz kI pF
Limits at -40NC are guaranteed by design and not production tested. Voltage referenced to ground. Specified with I2C bus inactive. Oscillator operational, INTCN = 1, ECLK = 0. Applies to CLKIN/INTA and SQW/INTB only. The minimum SCL clock frequency is limited by the bus timeout feature, which resets the serial bus interface if SCL is held low for tTIMEOUT. 7: After this period, the first clock pulse is generated. 8: A device must internally provide a hold time of at least 300ns for the SDA signal (referred to the VIHMIN of the SCL signal) to bridge the undefined region of the falling edge of SCL. 9: The maximum tHD:DAT need only be met if the device does not stretch the low period (tLOW) of the SCL signal. 10: A fast-mode device can be used in a standard-mode system, but the requirement tSU:DAT R to 250ns must then be met. This is automatically the case if the device does not stretch the low period of the SCL signal. If such a device does stretch the low period of the SCL signal, it must output the next data bit to the SDA line tRMAX + tSU:DAT = 1000 + 250 = 1250ns before the SCL line is released. 3
Low-Current I2C RTCs for High-ESR Crystals DS1341/DS1342
Note 11: CB is the total capacitance of one bus line, including all connected devices, in pF. Note 12: The parameter tOSF is the period of time the oscillator must be stopped for the OSF flag to be set over the voltage range of 2.4V P VCC P VCCMAX. Note 13: The DS1341/DS1342 can detect any single SCL clock held low longer than tTIMEOUTMIN. The devices' I2C interface is in reset state and can receive a new START condition when SCL is held low for at least tTIMEOUTMAX. Once the device detects this condition, the SDA output is released. The oscillator must be running for this function to work.
SDA tBUF tLOW SCL tHIGH tHD:DAT STOP START tSU:DAT REPEATED START tF tHD:STA tSP
tHD:STA
tR
tSU:STA
tSU:STO
NOTE: TIMING IS REFERENCED TO VILMAX AND VIHMIN.
Figure 1. Data Transfer on I2C Serial Bus
4
Low-Current I2C RTCs for High-ESR Crystals
Functional Diagram
VCC DS1341/DS1342 32.768kHz 8.192kHz 4.096kHz X1 /4 /2 /32 128Hz EXTSYNC EXT-1Hz X2 CONTROL LOGIC SCL SDA N SERIAL BUS INTERFACE AND ADDRESS REGISTER OSC-1Hz DIVIDER CLKIN/INTA OSC-1Hz MUX/ BUFFER N P SQW/INTB
DS1341/DS1342
ALARM AND CONTROL REGISTERS CLOCK AND CALENDAR REGISTERS
N
Pin Description
PIN 1 2 3 4 5 6 7 8 NAME X1 X2 CLKIN/INTA GND SDA SCL SQW/INTB VCC FUNCTION Connections for a Standard 32.768kHz Quartz Crystal. The internal oscillator circuitry is designed for operation with a crystal having a specified load capacitance (CL) of 6pF (DS1341) or 12.5pF (DS1342). Clock Input/Active-Low Interrupt Output. This I/O pin is used to output an alarm interrupt or accept an external clock input to drive the RTC counter. In the output mode, this is an open drain and requires an external pullup resistor. If not used, connect this pin to ground. Ground Serial-Data Input/Output. SDA is the input/output pin for the I2C serial interface. The SDA pin is open drain and requires an external pullup resistor. Serial-Clock Input. SCL is used to synchronize data movement on the serial interface. Square-Wave/Active-Low Interrupt Output. This pin is used to output a programmable square wave or an alarm interrupt signal. This is a CMOS push-pull output and does not require an external pullup resistor. If not used, this pin can be left unconnected. DC Power Input. This pin should be decoupled using a 0.01FF or 0.1FF capacitor.
5
Low-Current I2C RTCs for High-ESR Crystals DS1341/DS1342
Detailed Description
The DS1341/DS1342 low-current RTCs are timekeeping devices that consume an extremely low timekeeping current, which permits longer life from a power supply. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year through 2099. The clock operates in either a 24hr or 12hr format with an AM/PM indicator. The DS1341/DS1342 use an external 32.768kHz crystal. The oscillator circuit does not require any external resistors or capacitors to operate. The devices support a high-ESR crystal, which broadens the pool of usable crystals for the device. The DS1342 uses a 12.5pF crystal. The DS1341 uses a 6pF crystal, which decreases oscillator current draw, but is less commonly available than the 12.5pF crystals. The DS1341/DS1342 also accept an external clock reference for synchronization. The external clock can be a 32.768kHz, 50Hz, 60Hz, or 1Hz source. When the enable oscillator bit (EOSC) is a 0, the DS1341/DS1342 use the oscillator for timekeeping. If the enable external clock input bit (ECLK) is set to 1, the time base derived from the oscillator is compared to the 1Hz signal that is derived from the CLKIN signal. The conditioned signal drives the RTC time and date counters. If the oscillator is disabled and the CLKIN signal is absent, the time and date values remain static, provided that VCC remains at a valid level. When the external clock is lost or when the frequency differs more than Q0.8% from the crystal frequency, the signal derived from the crystal oscillator drives the RTC counter. When ECLK is set to 0, the RTC counter is always driven with the signal derived from the crystal oscillator. When the EOSC bit is a 1 and the external clock source is selected, the RTC counter is always clocked by the signal from the CLKIN pin. Address and data are transferred serially through an I2C serial interface. Other features include two time-of-day alarms, two interrupts, a programmable square-wave output, and a bus timeout mechanism that resets the I2C bus if it remains inactive for a minimum of tTIMEOUT. The DS1341/DS1342 are available in a lead(Pb)-free/ RoHS-compliant, 8-pin FSOP package. Both devices support a -40NC to +85NC extended temperature range. The DS1341/DS1342 use an external 32.768kHz crystal. The oscillator circuit does not require any external resistors or capacitors to operate. The DS1341 includes integrated capacitive loading for a 6pF CL crystal, and the DS1342 includes integrated capacitive loading for a 12.5pF CL crystal. See the Crystal Parameters table for the external crystal parameters. The Functional Diagram shows a simplified schematic of the oscillator circuit. The startup time is usually less than 1 second when using a crystal with the specified characteristics. When running from the internal oscillator, the accuracy of the clock is dependent upon the accuracy of the crystal and the accuracy of the match between the capacitive load of the oscillator circuit and the capacitive load for which the crystal was trimmed. Additional error is added by crystal frequency drift caused by temperature shifts. External circuit noise coupled into the oscillator circuit can result in the clock running fast. Figure 2 shows a typical PCB layout for isolation of the crystal and oscillator from noise. Refer to Application Note 58: Crystal Considerations with Dallas Real-Time Clocks for detailed information.
Oscillator Circuit
Clock Accuracy
LOCAL GROUND PLANE (LAYER 2)
X1 CRYSTAL X2
GND
NOTE: AVOID ROUTING SIGNALS IN THE CROSSHATCHED AREA (UPPER LEFT-HAND QUADRANT) OF THE PACKAGE UNLESS THERE IS A GROUND PLANE BETWEEN THE SIGNAL LINE AND THE PACKAGE.
Figure 2. Layout Example
6
Low-Current I2C RTCs for High-ESR Crystals
When an external clock reference is used, the input from CLKIN/INTA is divided down to 1Hz by the divisor selected by the CLKSEL[2:1] bits. The 1Hz from the divider (Ext-1Hz, see the Functional Diagram) is used to correct the 1Hz that is derived from the 32.768kHz oscillator (Osc-1Hz). As Osc-1Hz drifts in relation to Ext-1Hz, Osc-1Hz is digitally adjusted. As shown in the Functional Diagram, the three highest frequencies driving the SQW/INTB pin are derived from the uncorrected oscillator, while the 1Hz output is derived from the adjusted Osc-1Hz signal. Conceptually, the circuit can be thought of as two 1Hz signals, one derived from the internal oscillator and the other derived from the external reference clock, with the oscillator-derived 1Hz signal being locked to the 1Hz signal derived from the external reference clock. The edges of the 1Hz signals do not need to be aligned with
External Synchronization
each other. While the external clock source is present and within tolerance, the Ext-1Hz and Osc-1Hz maintain their existing lock, regardless of their edge alignment, with periodic correction of the Osc-1Hz signal. If the external signal is lost and then regained sometime later, the signals relock with whatever new alignment exists (see Figure 3). The Ext-1Hz is used by the device as long as it is within tolerance, which is about 0.8% of Osc-1Hz. While Ext1Hz is within tolerance, the skew between the two signals could shift until a change of approximately 7.8ms accumulates, after which the Osc-1Hz signal is adjusted (see Figure 4). The adjustment is accomplished by digitally adjusting the 32kHz oscillator divider chain. If the difference between Ext-1Hz and Osc-1Hz is greater than approximately 0.8%, Osc-1Hz runs unadjusted (see Figure 3) and the loss of signal (LOS) is set, provided the ECLK bit is set.
DS1341/DS1342
OSC-1Hz FROM OSCILLATOR
SKEW EXT-1Hz FROM EXTERNAL REFERENCE BREAK IN EXTERNAL REFERENCE SIGNAL
SKEW
Figure 3. Loss and Reacquisition of External Reference Clock
OSC-1Hz FROM OSCILLATOR
CURRENT LOCK
DRIFT AFTER N CYCLES
SHIFTED BACK TO CURRENT LOCK
EXT-1Hz FROM EXTERNAL REFERENCE
Figure 4. Drift and Adjustment of Internal 1Hz to External Reference Clock 7
Low-Current I2C RTCs for High-ESR Crystals DS1341/DS1342
Table 1 shows the map for the DS1341/DS1342 registers. During a multibyte access, if the address pointer reaches the end of the register space (0Fh), it wraps around to location 00h. On either an I2C START or address pointer incrementing to location 00h, the current time is transferred to a second set of registers. The time information is read from these secondary registers while the clock continues to run. This eliminates the need to reread the registers in case the main registers update during a read.
Register Map
The I2C interface is guaranteed to operate when VCC is between 1.8V and 5.5V and the EOSC bit is 0. The I2C interface is accessible whenever VCC is at a valid level. To prevent invalid device operation, the I2C interface should not be accessed when VCC is below +1.8V. If a microcontroller connected to the DS1341/DS1342 resets during I2C communications, it is possible that the microcontroller and the DS1341/DS1342 could become unsynchronized. When the microcontroller resets, the DS1341/DS1342 I2C interface can be placed into a
I2C Interface
Table 1. Register Map
ADDRESS 00h 01h 02h 03h 04h 05h 06h 07h 08h 09h 0Ah 0Bh 0Ch 0Dh 0Eh 0Fh A1M1 A1M2 A1M3 A1M4 A2M2 A2M3 A2M4 EOSC OSF 12/24 DY/DT 0 DOSF 12/24 DY/DT BIT 7 0 0 0 0 0 CENT 12/24 0 0 0 10 Year 10 Seconds 10 Minutes AM/PM 10hr 10hr 0 BIT 6 BIT 5 10 Seconds 10 Minutes AM/PM 10hr 0 10 Date 10 MO 10hr 0 0 Date Month Year Seconds Minutes Hour Day, Date Minutes 10hr Hour Day, Date RS1 INTCN ECLK A2IE A2F A1IE A1F BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 FUNCTION Seconds Minutes Hours Day Day Date Month/ Century Year Alarm 1 Seconds Alarm 1 Minutes Alarm 1 Hours Alarm 1 Day, Alarm 1 Date Alarm 2 Minutes Alarm 2 Hours Alarm 2 Day, Alarm 2 Date Control Control/ Status RANGE 00-59 00-59 1-12+AM/PM 00-23 1-7 01-31 01-12 + Century 00-99 00-59 00-59 1-12 + AM/PM 00-23 1-7 1-31 00-59 1-12 + AM/PM 00-23 1-7 1-31 -- -- Seconds Minutes Hour
10 Date 10 Minutes AM/PM 10hr
10 Date EGFIL LOS RS2
CLKSEL2 CLKSEL1
Note: Bits listed as 0 always read back as 0 and cannot be written to a 1.
8
Low-Current I2C RTCs for High-ESR Crystals
known state by holding SCL low for tTIMEOUT. Doing so limits the minimum frequency at which the I2C interface can be operated. If data is being written to the device when the interface timeout is exceeded, prior to the acknowledge, the incomplete byte of data is not written. The time and calendar information is obtained by reading the appropriate register bytes. The RTC registers are illustrated in Table 1. The time and calendar are set or initialized by writing the appropriate register bytes. The contents of the time and calendar registers are in the binary-coded decimal (BCD) format. The Day register increments at midnight and rolls over from 7 to 1. Values that correspond to the day-of-week are user-defined but must be sequential (i.e., if 1 equals Sunday, then 2 equals Monday, and so on). The CENT bit in the Month register toggles when the Years register rolls over from 99 to 00. Illogical time and date entries result in an undefined operation. The DS1341/DS1342 can be run in either 12hr or 24hr mode. Bit 6 of the Hours register is defined as the 12hr or 24hr mode select bit. When high, the 12hr mode is selected. In the 12hr mode, bit 5 is the AM/PM bit, with a content of 1 being PM. In the 24hr mode, bit 5 is the second bit of the 10hr field. The century bit (bit 7 of the Month register) is toggled when the Years register increments from 99 to 00. On a power-on reset (POR), the time and date are set to 00:00:00 00/01/01 and the Day register is set to 01. The DS1341/DS1342 contain two time-of-day/date alarms. Alarm 1 can be set by writing to registers 07h- 0Ah. Alarm 2 can be set by writing to registers 0Bh-0Dh. The alarms can be programmed to activate the CLKIN/ INTA or SQW/INTB outputs (see Table 5) on an alarm match condition. Bit 7 of each of the time of day/date alarm registers are mask bits. When all the mask bits for each alarm are 0, an alarm only occurs when the values in the timekeeping registers 00h-06h match the values stored in the time of day/date alarm registers. The alarms can also be programmed to repeat every second, minute, hour, day, or date. Tables 2 and 3 show the possible alarm settings. Configurations not listed in the tables result in illogical operation. POR values are undefined. The DY/DT bits (bit 6 of the alarm day/date registers) control whether the alarm value stored in bits 0 to 5 of that register reflects the day of the week or the date of the month. If DY/DT is written to 0, the alarm is the result
DS1341/DS1342
Clock and Calendar (00h-06h)
Alarms (07h-0Dh)
Table 2. Alarm 1 Mask Bits
DY/DT X X X X 0 1 X = Don't care. ALARM 1 MASK BITS (BIT 7) A1M4 1 1 1 1 0 0 A1M3 1 1 1 0 0 0 A1M2 1 1 0 0 0 0 A1M1 1 0 0 0 0 0 Alarm once per second. Alarm when seconds match. Alarm when minutes and seconds match. Alarm when hours, minutes, and seconds match. Alarm when date, hours, minutes, and seconds match. Alarm when day, hours, minutes, and seconds match. ALARM RATE
Table 3. Alarm 2 Mask Bits
DY/DT X X X 0 1 X = Don't care. ALARM 2 MASK BITS (BIT 7) A2M4 1 1 1 0 0 A2M3 1 1 0 0 0 A2M2 1 0 0 0 0 ALARM RATE Alarm once per minute (00 second of every minute). Alarm when minutes match. Alarm when hours and minutes match. Alarm when date, hours, and minutes match. Alarm when day, hours, and minutes match.
9
Low-Current I2C RTCs for High-ESR Crystals DS1341/DS1342
of a match with date of the month. If DY/DT is written to 1, the alarm is the result of a match with day of the week. When the RTC register values match alarm register settings, the corresponding alarm flag bit (A1F or A2F) is set to 1 in the Control/Status register. If the corresponding alarm interrupt enable bit (A1IE or A2IE) is also set to 1 in the Control register, the alarm condition activates the output(s) defined by the ECLK and INTCN bits (see Table 5). Bit 7: Enable Oscillator (EOSC). When the EOSC bit is 0, the oscillator is enabled. When this bit is a 1, the oscillator is disabled. This bit is cleared (0) when power is first applied. Bit 6: No Function Bit 5: Enable Glitch Filter (EGFIL). When the EGFIL bit is 1, the 5Fs glitch filter at the output of the crystal oscillator is enabled. The glitch filter is disabled when this bit is 0. Disabling the glitch filter is useful in reducing power consumption. This bit is cleared (0) when power is first applied. Bits 4 and 3: Rate Select (RS[2:1]). These bits control the frequency of the square-wave output when the square wave has been enabled. Table 4 shows the square-wave frequencies that can be selected with the RS bits. These bits are both set to 1 (32.768kHz) when power is first applied. The 32.768kHz oscillator is the source of all square-wave output frequencies. Frequencies above 1Hz are not conditioned by CLKIN. The 1Hz output is the 32.768kHz oscillator frequency, divided down to 1Hz and conditioned by CLKIN, provided that the CLKIN frequency differs by no more than Q0.8% from the crystal frequency. Cycle-tocycle jitter of the 1Hz square wave can be up to 2ms. Bit 2: Interrupt Control (INTCN). This bit controls the relationship between the two alarms and the interrupt output pins. When the INTCN bit is 0, a square wave is output on the SQW/INTB pin, and the state of the ECLK bit determines the function of the CLKIN/INTA pin (see Table 5). When the INTCN bit is 1 and the ECLK bit is a 0, a match between the timekeeping registers and the alarm 1 registers activates the CLKIN/INTA pin (provided that the alarm is enabled) and a match between the timekeeping registers and the alarm 2 registers activates the SQW/INTB pin (provided that the alarm is enabled). When the INTCN bit is 1 and the ECLK bit is a 1, a match between the timekeeping registers and the alarm 1 registers or a match between the timekeeping registers and the alarm 2 registers activates the SQW/INTB pin (provided that the alarm is enabled). This bit is cleared (0) when power is first applied. Bit 1: Alarm 2 Interrupt Enable (A2IE). When the A2IE bit is 0, the alarm 2 interrupt function is disabled. When the A2IE bit is 1, the alarm 2 interrupt function is enabled and is routed to an output, based upon the steering defined by the INTCN and ECLK bits, as noted in Table 5. Regardless of the state of A2IE, a match between the timekeeping registers and the alarm 2 registers (0Bh-0Dh) sets the alarm 2 flag bit (A2F). This bit is cleared (0) when power is first applied. Bit 0: Alarm 1 Interrupt Enable (A1IE). When the A1IE bit is 0, the alarm 1 interrupt function is disabled. When the A1IE bit is 1, the alarm 1 interrupt function is enabled and is routed to an output, based upon the steering defined by the INTCN and ECLK bits, as noted in Table 5. Regardless of the state of A1IE, a match between the timekeeping registers and the alarm 1 registers (07h- 0Ah) sets the alarm 1 flag bit (A1F). This bit is cleared (0) when power is first applied.
Control Register (0Eh)
Control Register Bitmap (0Eh)
BIT 7 EOSC 0 BIT 6 0 0 BIT 5 EGFIL 0 BIT 4 RS2 1 BIT 3 RS1 1 BIT 2 INTCN 0 BIT 1 A2IE 0 BIT 0 A1IE 0
Table 4. SQW/INTB Output Settings
RS2 0 0 1 1 10 RS1 0 1 0 1 SQW/INTB 1Hz 4.098kHz 8.192kHz 32.768kHz
Table 5. Interrupt Output Routing
INTCN 0 0 1 1 ECLK 0 1 0 1 CLKIN/INTA A1F + A2F CLKIN Input A1F CLKIN Input SQW/INTB SQW SQW A2F A1F + A2F
Low-Current I2C RTCs for High-ESR Crystals
Control/Status Register Bitmap (0Fh)
BIT 7 OSF 1 BIT 6 DOSF 0 BIT 5 LOS 1 BIT 4 CLKSEL2 0 BIT 3 CLKSEL1 0 BIT 2 ECLK 0 BIT 1 A2F X BIT 0 A1F X
DS1341/DS1342
Bit 7: Oscillator Stop Flag (OSF). If the OSF bit is a 1, that indicates the oscillator has stopped or was stopped for some period of time, and could be used to judge the validity of the clock and calendar data. This bit is edge triggered and is set to 1 when the internal circuitry senses the oscillator has transitioned from a normal run state to a STOP condition. The following are examples of conditions that can cause the OSF bit to be set: 1) Power is applied for the first time. 2) The voltage present on VCC is insufficient to support oscillation. 3) The EOSC bit is turned off. 4) There are external influences on the crystal (e.g., noise, leakage, etc.). This bit remains at 1 until written to 0. Attempting to write OSF to 1 leaves the value unchanged. Bit 6: Disable Oscillator Stop Flag (DOSF). This bit, when set to 1, disables the sensing of the oscillator conditions that would set the OSF bit. OSF remains at 0 regardless of what happens to the oscillator. This bit is cleared (0) when power is first applied. Disabling the oscillator sensing is useful in reducing power consumption. Bit 5: Loss of Signal (LOS). This status bit indicates the state of the CLKIN pin. The bit is set to 1 when the RTC counter is no longer conditioned by the external clock. This happens when ECLK = 0, or when the clock signal at CLKIN stops toggling, or when the CLKIN frequency differs more than Q0.8% from the selected input frequency. This bit remains at 1 until written to 0. Attempting to write LOS to 1 leaves the value unchanged. Clearing the LOS flag when the CLKIN frequency is invalid inhibits subsequent detections of the input frequency deviation. Bits 4 and 3: Select Clock Source (CLKSEL[2:1]). These two register bits select the clock source to drive the RTC counter. Table 6 lists the input frequencies that can be selected. Upon power-up, the bits are cleared to 0 and the 1Hz rate is selected.
Control/Status Register (0Fh)
Table 6. Input Frequency Options
CLKSEL2 0 0 1 1 CLKSEL1 0 1 0 1 CLKIN/INTA 1Hz Input 50Hz Input 60Hz Input 32.768kHz Input
Bit 2: Enable External Clock Input (ECLK). This bit controls the direction of the CLKIN/INTA pin (see Table 5). When the ECLK bit is 1, the CLKIN/INTA pin is an input, with the expected input rate defined by the state of CLKSEL2 and CLKSEL1 (see Table 6). When the ECLK bit is 0, the CLKIN/INTA pin is an interrupt output (see Table 5). If the INTCN bit is 0, CLKIN/INTA contains the status of A1F (provided that the A1IE bit is 1) or A2F (provided that the A2IE bit is 1). If the INTCN bit is 1, CLKIN/INTA contains the status of A1F (provided that the A1IE bit is 1). This bit is set to 0 when power is first applied. Bit 1: Alarm 2 Flag (A2F). A 1 in the alarm 2 flag bit indicates that the time matched the alarm 2 registers. This flag can be used to generate an interrupt on either CLKIN/INTA or SQW/INTB depending on the status of the INTCN bit in the Control register. If the INTCN bit is set to 0 and A2F bit is a 1 (and A2IE bit is also 1), the CLKIN/INTA pin goes low. If the INTCN bit is set to 1 and A2F bit is 1 (and A2IE bit is also 1), the SQW/INTB pin goes low. The A2F bit is cleared when written to 0. This bit can only be written to 0. Attempting to write this bit to 1 leaves the value unchanged. Bit 0: Alarm 1 Flag (A1F). A 1 in the alarm 1 flag bit indicates that the time matched the alarm 1 registers. If the A1IE bit is also 1, the CLKIN/INTA pin goes low. A1F is cleared when written to 0. This bit can only be written to 0. Attempting to write this bit to 1 leaves the value unchanged.
11
Low-Current I2C RTCs for High-ESR Crystals DS1341/DS1342
I2C Serial Port Operation
The DS1341/DS1342s' slave address byte is D0h. The first byte sent to the device includes the device identifier, device address, and the R/W bit (Figure 5). The device address sent by the I2C master must match the address assigned to the device. The following terminology is commonly used to describe I2C data transfers.
I2C Slave Address
Bit Write: Transitions of SDA must occur during the low state of SCL. The data on SDA must remain valid and unchanged during the entire high pulse of SCL plus the setup and hold time requirements (see Figure 1). Data is shifted into the device during the rising edge of the SCL. Bit Read: At the end of a write operation, the master must release the SDA bus line for the proper amount of setup time (see Figure 1) before the next rising edge of SCL during a bit read. The device shifts out each bit of data on SDA at the falling edge of the previous SCL pulse and the data bit is valid at the rising edge of the current SCL pulse. Remember that the master generates all SCL clock pulses including when it is reading bits from the slave. Acknowledge (ACK and NACK): An acknowledge (ACK) or not acknowledge (NACK) is always the ninth bit transmitted during a byte transfer. The device receiving data (the master during a read or the slave during a write operation) performs an ACK by transmitting a 0 during the ninth bit. A device performs a NACK by transmitting a 1 during the ninth bit. Timing for the ACK and NACK is identical to all other bit writes. An ACK is the acknowledgment that the device is properly receiving data. A NACK is used to terminate a read sequence or as an indication that the device is not receiving data. Byte Write: A byte write consists of 8 bits of information transferred from the master to the slave (most significant bit first) plus a 1-bit acknowledgment from the slave to the master. The 8 bits transmitted by the master are done according to the bit write definition and the acknowledgment is read using the bit read definition. Byte Read: A byte read is an 8-bit information transfer from the slave to the master plus a 1-bit ACK or NACK from the master to the slave. The 8 bits of information that are transferred (most significant bit first) from the slave to the master are read by the master using the bit read definition, and the master transmits an ACK using the bit write definition to receive additional data bytes. The master must NACK the last byte read to terminate communication so the slave returns control of SDA to the master. Slave Address Byte: Each slave on the I2C bus responds to a slave address byte sent immediately following a START condition. The slave address byte contains the slave address in the most significant 7 bits and the R/W bit in the least significant bit. The
I2C Definitions
Master Device: The master device controls the slave devices on the bus. The master device generates SCL clock pulses and START and STOP conditions. Slave Devices: Slave devices send and receive data at the master's request. Bus Idle or Not Busy: Time between STOP and START conditions when both SDA and SCL are inactive and in their logic-high states. When the bus is idle, it often initiates a low-power mode for slave devices. START Condition: A START condition is generated by the master to initiate a new data transfer with a slave. Transitioning SDA from high to low while SCL remains high generates a START condition. See Figure 1 for applicable timing. STOP Condition: A STOP condition is generated by the master to end a data transfer with a slave. Transitioning SDA from low to high while SCL remains high generates a STOP condition. See Figure 1 for applicable timing. Repeated START Condition: The master can use a repeated START condition at the end of one data transfer to indicate that it immediately initiates a new data transfer following the current one. Repeated STARTs are commonly used during read operations to identify a specific memory address to begin a data transfer. A repeated START condition is issued identically to a normal START condition. See Figure 1 for applicable timing.
MSB 1 1 0 1 0 0 DEVICE ADDRESS 0 LSB R/W READ/ WRITE BIT
DEVICE IDENTIFIER
Figure 5. Slave Address Byte 12
Low-Current I2C RTCs for High-ESR Crystals DS1341/DS1342
TYPICAL I2C WRITE TRANSACTION MSB START 1 1 0 1 SLAVE ADDRESS 0 0 0 LSB R/W READ/ WRITE SLAVE ACK MSB b7 b6 b5 b4 b3 b2 b1 LSB b0 SLAVE ACK MSB b7 b6 b5 b4 b3 b2 b1 LSB b0 SLAVE ACK STOP
REGISTER ADDRESS
DATA
EXAMPLE I2C TRANSACTIONS D0h A) SINGLE BYTE WRITE -WRITE CONTROL REGISTER TO 18h B) SINGLE BYTE READ -READ CONTROL REGISTER START 11010000 D0h START 1 1 0 1 0 0 0 0 0Eh SLAVE 00001110 ACK 18h SLAVE 00011000 ACK SLAVE ACK D1h REPEATED START 02h SLAVE ACK 00000010 SLAVE ACK D1h SLAVE ACK REPEATED START 11010001 SLAVE ACK 11010001 SLAVE ACK 11h 00010001 SLAVE ACK DATA VALUE MASTER ACK STOP
STOP DATA VALUE MASTER NACK STOP
0Eh SLAVE SLAVE 00001110 ACK ACK 04h SLAVE ACK 00000100
D0h C) MULTIBYTE WRITE -WRITE DATA REGISTER TO "02" AND MONTH REGISTER TO "11" D) MULTIBYTE READ -READ ALARM 2 HOURS AND DATA VALUES START 1 1 0 1 0 0 0 0
D0h START 1 1 0 1 0 0 0 0 SLAVE ACK
0Ch 00001100
DATA VALUE MASTER NACK STOP
Figure 6. I2C Transactions
DS1341/DS1342s' slave address is D0h and cannot be modified by the user. When the R/W bit is 0 (such as in D0h), the master is indicating it writes data to the slave. If R/W = 1 (D1h in this case), the master is indicating it wants to read from the slave. If an incorrect slave address is written, the DS1341/DS1342 assume the master is communicating with another I2C device and ignore the communication until the next START condition is sent. Memory Address: During an I2C write operation, the master must transmit a memory address to identify the memory location where the slave is to store the data. The memory address is always the second byte transmitted during a write operation following the slave address byte.
Writing Multiple Bytes to a Slave: To write multiple bytes to a slave, the master generates a START condition, writes the slave address byte (R/W = 0), writes the starting memory address, writes multiple data bytes, and generates a STOP condition. Reading a Single Byte from a Slave: Unlike the write operation that uses the specified memory address byte to define where the data is to be written, the read operation occurs at the present value of the memory address counter. To read a single byte from the slave, the master generates a START condition, writes the slave address byte with R/W = 1, reads the data byte with a NACK to indicate the end of the transfer, and generates a STOP condition. However, since requiring the master to keep track of the memory address counter is impractical, use the method for manipulating the address counter for reads. Manipulating the Address Counter for Reads: A dummy write cycle can be used to force the address counter to a particular value. To do this the master generates a START condition, writes the slave address byte (R/W = 0), writes the memory address where it desires to read, generates a repeated START condition, writes the slave address byte (R/W = 1),
I2C Communication 2C communication example. See Figure 6 for an I
Writing a Single Byte to a Slave: The master must generate a START condition, write the slave address byte (R/W = 0), write the memory address, write the byte of data, and generate a STOP condition. Remember the master must read the slave's acknowledgment during all byte write operations.
13
Low-Current I2C RTCs for High-ESR Crystals DS1341/DS1342
reads data with ACK or NACK as applicable, and generates a STOP condition. See Figure 6 for a read example using the repeated START condition to specify the starting memory location. Reading Multiple Bytes from a Slave: The read operation can be used to read multiple bytes with a single transfer. When reading bytes from the slave, the master simply ACKs the data byte if it desires to read another byte before terminating the transaction. After the master reads the last byte it must NACK to indicate the end of the transfer and then it generates a STOP condition. To avoid an unintended I2C interface timeout, SCL should not be held low longer than tTIMEOUTMIN. The I2C interface is in the reset state and can receive a new START condition when SCL is held low for at least tTIMEOUTMAX. When the device detects this condition, SDA is released and allowed to be pulled high by the external pullup resistor. For the timeout function to work, the oscillator must be enabled and running. nents minimize lead inductance, which improves performance, and ceramic capacitors tend to have adequate high-frequency response for decoupling applications. The CLKIN/INTA output is open drain and, therefore, requires an external pullup resistor to realize a logic-high output level. SDA is an open-drain output and requires an external pullup resistor to realize a logic-high level.
Using Open-Drain Outputs
SDA and SCL Pullup Resistors
Bus Timeout
Because the DS1341/DS1342 do not use clock cycle stretching, a master using either an open-drain output with a pullup resistor or CMOS output driver (push-pull) could be used for SCL.
Chip Information
SUBSTRATE CONNECTED TO GROUND
Package Information
For the latest package outline information and land patterns, go to www.maxim-ic.com/packages. Note that a "+", "#", or "-" in the package code indicates RoHS status only. Package drawings may show a different suffix character, but the drawing pertains to the package regardless of RoHS status.
PACKAGE TYPE 8 FSOP PACKAGE CODE U8+1 DOCUMENT NO. 21-0036
Applications Information
To achieve the best results when using the DS1341/ DS1342, decouple the VCC power supply with a 0.01FF and/or 0.1FF capacitor. Use a high-quality, ceramic, surface-mount capacitor if possible. Surface-mount compo-
Power-Supply Decoupling
Maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim product. No circuit patent licenses are implied. Maxim reserves the right to change the circuitry and specifications without notice at any time.
14
(c)
Maxim Integrated Products, 120 San Gabriel Drive, Sunnyvale, CA 94086 408-737-7600 2009 Maxim Integrated Products Maxim is a registered trademark of Maxim Integrated Products, Inc.


▲Up To Search▲   

 
Price & Availability of DS1341U

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X